<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>邮件查询</title>
	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
	<script src="js/preload.js"></script>
	<script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
	<!--<script src="//cdn.bootcss.com/lodash.js/4.13.1/lodash.min.js"></script>-->
	<script src="http://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
	<script src="http://cdn.bootcss.com/handlebars.js/4.0.5/handlebars.min.js"></script>
	<script src="http://cdn.bootcss.com/moment.js/2.13.0/moment.min.js"></script>
	<script src="js/app.js"></script>
</head>
<body>
<div class="container">
	<h1 class="page-header">内容检索</h1>
	<div class="navbar navbar-default">
		<form class="navbar-form searchForm">
			<div class="form-group">
				<label for="keyword">关键字:</label>
				<input type="text" class="form-control keyword" id="keyword" placeholder="请输入检索内容">
			</div>
			<button type="submit" class="btn btn-primary">提交</button>
			<button type="button" class="btn btn-primary pull-right update-all">同步所有邮件</button>
		</form>
	</div>
	<div class="ibox float-e-margins">
		<div class="ibox-title">
			<h2 class="page-header">邮件内容</h2>
		</div>
		<div class="ibox-content">
			<div class="list-group"></div>
		</div>
	</div>
</div>
<!-- Modal -->
<div class="modal fade" id="waitModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h4 class="modal-title">请求处理中...</h4>
			</div>
			<div class="modal-body">
				<div class="progress">
					<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="progressModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h4 class="modal-title">邮件更新中...</h4>
			</div>
			<div class="modal-body">
				<div class="progress">
					<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
				</div>
			</div>
		</div>
	</div>
</div>
<script id="template" type="x-tmpl-mustache">
{{#mails}}
<a class="list-group-item mail-item">
    <h3 class="list-group-item-heading">{{title}}</h3>
    <p class="list-group-item-text">{{content}}</p>
    <hr style="margin:3px">
    <p class="list-group-item-text result">{{result}}</p>
    <div>
        <span>{{formatDate publishDate}}</span>
        <button type="button" class="btn btn-default btn-xs updateBtn" data-id="{{id}}" data-url="{{url}}">更新</button>
    </div>
</a>
{{/mails}}
</script>
</body>
</html>
